TextUIConfig

open class TextUIConfig : Parcelable

A configurations of text. This provides a way of applying com.google.android.material.resources.TextAppearance into this class's properties. A background color property is not applied automatically because background attributes is not a property of com.google.android.material.resources.TextAppearance.

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun apply(config: TextUIConfig): TextUIConfig

Apply values in the given TextUIConfig into this.

fun apply(context: Context, text: String): SpannableString

Apply values into given whole text.

Link copied to clipboard
fun bind(    context: Context,     spannable: Spannable,     start: Int,     end: Int)

Apply values into Spannable text.

Link copied to clipboard
fun generateTypeface(): Typeface

Generates typeface from text style.

Link copied to clipboard
fun mergeFromTextAppearance(    context: Context,     @StyleRes textAppearance: Int,     @ColorRes textBackgroundColor: Int = 0)

Merge attributes into this instance's values by given com.google.android.material.resources.TextAppearance and background color.

Properties

Link copied to clipboard
var customFontRes: Int

Returns a custom font res ID.

Link copied to clipboard
var familyName: String?

Returns a value of text typeface family.

Link copied to clipboard
var textBackgroundColor: Int

Returns a value of background color int.

Link copied to clipboard
var textColor: Int

Returns a value of text color int.

Link copied to clipboard
var textSize: Int

Returns a value of text size int.

Link copied to clipboard
var textStyle: Int

Returns a value of android.graphics.Typeface.